class Ingredient {
  Ingredient({required this.unit, required this.name, this.type = '荤料'});

  String unit;
  String name;
  String type;

  @override
  bool operator ==(Object other) {
    if (identical(this, other)) return true;
    if (other.runtimeType != runtimeType) return false;
    return other is Ingredient &&
        other.unit == unit &&
        other.name == name &&
        other.type == type;
  }

  @override
  int get hashCode => Object.hash(unit, name, type);
}
